[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WAITFOR

  .  Summary

  waitfor(str <waitstr>, int <timeout>);

  .  Description

  The waitfor function is used to wait for the given string to come in
  over the serial port. Timeout is the maximum amount of time, in sec-
  onds, to wait for the string. Case is not significant, and the
  string must be no longer than 40 characters.

  .  Return Value

  A non-zero (TRUE) value is returned if the string is received from
  the serial port in the given time, otherwise a zero (FALSE) value is
  returned.

  .  Example

  if (waitfor("name?", 1800))
   prints("The string 'name?' came in from the comm port.");
  else
   {
    prints("The string 'name?' did not come in from the");
    prints("comm port in 3 minutes!");
   }


See Also: track
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson